<?php
/**
 * Created by PhpStorm.
 * User: sunnicholas
 * Date: 2017/10/31
 * Time: 10:59
 */

$image = new ZBarCodeImage("sy.png");

$scanner = new ZBarCodeScanner();

$barcode = $scanner->scan($image);

if(!empty($barcode)){
    foreach ($barcode as $code){
        printf("found type %s barcode with %s\n", $code['type'],$code['data']);
    }
}